package com.cskt.petpms.mapper;

import com.cskt.common.condition.SearchProductCondition;
import com.cskt.common.entity.vo.ProductVO;
import com.cskt.common.entity.vo.SpuVO;
import com.cskt.common.entity.pojo.Spu;

import java.util.List;

public interface SpuMapper {
    int deleteByPrimaryKey(Long id);

    int insertSelective(Spu record);

    Spu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Spu record);

    /**
     * 分页查询商品信息
     * @param condition 条件
     * @return
     */
    List<ProductVO> selectProductVOByCondition(SearchProductCondition condition);

    /**
     * 分页查询总数量
     * @param condition
     * @return
     */
    Integer countProductVOByCondition(SearchProductCondition condition);

    /**
     * 根据id查询spuVO
     * @param id
     * @return
     */
    SpuVO selectSpuVOById(Long id);
    
}